let pool = require('../../mysql/pool')
let fs = require('fs')

module.exports = (req, res) => {
  let { username, userphonenumber, userpassword } = req.body
  let querystr1 = 'insert into user value(?,?)'
  pool.query(querystr1, [username, userpassword], (err, result) => {
    if (err) { return console.log("插入user失败" + err.message) }
    console.log("插入suer成功,注册成功");
    res.redirect('http://8.138.146.253:9000/html/login.html')
  })
}